home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / ZIPSHORT.DOC < prev    next >
Text File  |  1996-09-22  |  9KB  |  216 lines

  1.         ******************************
  2.             ZIPSHORT v1.0
  3.     
  4.          modify ZIP archive containing 
  5.                   non-dos compatible filenames
  6.               by Guenter Nagler 
  7.                 1995 
  8.           (gnagler@ihm.tu-graz.ac.at)
  9.         ******************************
  10.  
  11. [1] BACKGROUND
  12. PKZIP is a popular archive shareware utility developed by PKWARE Inc. (TM)
  13. Now there are compatible tools available on several platforms.
  14. The differences between the file systems are the reasons that some
  15. zipped archives are not easily to unzip when exchanging between certain
  16. systems.
  17. Macintosh, Win95, WinNT system allow using long filenames containing
  18. whitespaces, :, \, and many other characters that are not allowed
  19. in filenames of other file systems (e.g. DOS).
  20. PKUNZIP for DOS does not handle this problem. It tries to write the filenames
  21. and if this works for unbelievable reason, the files are usually not
  22. accessible or simply truncated to 8 characters.
  23.  
  24. Therefore I wrote this utility ZIPSHORT that parses the ARCHIVE 
  25. headers and index and generates DOS compatible short filenames.
  26. It also saves an index that contains the long filenames together with the
  27. generated short names. ZIPSHORT modifies the zip file, but generates 
  28. an undo file to be able to undo all modifications at later time using
  29. undo option.
  30. With further options the list of existing short filenames can be extended 
  31. (from directory tree or from a list stored in a file). The program
  32. will try to use only short names that are not existing.
  33.  
  34. The names modified using following methods:
  35.  - truncate extensions to maximum 3 characters
  36.  - remove all not compatible characters (e.g. spaces)
  37.  - remove vowels (a,e,i,o,u) beginning at end of names until name has
  38.    maximum 8 characters or all vowels are removed.
  39.  - remove not alphanumerical characters beginning at end of names until name
  40.    has maximum 8 characters or all characters are alphanumeric.
  41.  - truncate name to maximum of 8 characters
  42.  - (*) the name is used as is if it is unique to the list of already known short
  43.    names
  44.  - add iteration number 1, 2, ... to the name until the name is 
  45.    unique to list of already known short names
  46.  - if adding the number will generate a name longer than 8 characters
  47.    the name is truncated by  a character from end of the name
  48.    continue with (*) until a name is accepted
  49.   
  50.  
  51. [2] FILES DESCRIPTION
  52.  
  53. ZIPSHORT.EXE..........MSDOS executable 
  54. ZIPSHORT.DOC..........this file, showing usage of ZIPSHORT.EXE
  55. only ZIPSHORT.EXE is required to run program 
  56.  
  57. [3] COPYRIGHT
  58.  
  59. ZIPSHORT (c) 1996 was created by Guenter Nagler.
  60.  
  61. ZIPSHORT is free and may be used as you wish with this one exception:
  62.  
  63.     You may NOT charge any fee or derive any profit for distribution
  64.     of ZIPSHORT.  Thus, you may NOT sell or bundle ZIPSHORT with any 
  65.     product in a retail environment (shareware disk distribution, CD-ROM,
  66.     etc.) without permission of the author.
  67.  
  68. You may give ZIPSHORT to your friends, upload it to a BBS, or ftp it to
  69. another internet site, as long as you don't charge anything for it.
  70.  
  71. [4] DISCLAIMER
  72.  
  73. ZIPSHORT modifies or copies zipped archives when specifying a new filename.
  74. At beginning you should use the safer variant of ZIPSHORT that first
  75. generates a copy of the archive and modifies only the duplicate or 
  76. keep a backup of your zip file before using it.
  77. Modifications to zip files usually can be undone by using -u option.
  78. This only works if the zip files are not modified by ZIP tools after
  79. using ZIPSHORT. It is not guaranteed that ZIPSHORT can handle any 
  80. zipped archive.
  81.  
  82. Use ZIPSHORT at your own risk.  Anything you do with ZIPSHORT is your
  83. responsibility, and not the author's.  Any damage caused to any person,
  84. computer, software, hardware, company, or business by running ZIPSHORT 
  85. is your responsibility, and the author will not be liable.
  86.  
  87. If you don't understand these terms, or are not sure of something, or
  88. are afraid something bad might come of using ZIPSHORT, don't  use  it!
  89. You are here forewarned.
  90.  
  91. [5] INSTALLATION 
  92.  
  93. Simply copy ZIPSHORT.EXE in a directory that is in your path.
  94.  
  95. [6] USAGE
  96.  
  97. usage: zipshort [-d dir] [-f file] [-u] filename.zip [output.zip]
  98. -d directory    all filenames existing in this directory tree are not nused
  99. -f file.lst    all filenames in this file are not used (one filename per line)
  100. -u file.und    undo changes
  101.  
  102. The parts in brackets [...] are optional.
  103. Options -d and -f can be used more than once.
  104.  
  105. The filename.zip must be specified and should refer to an existing zipped
  106. file.
  107.  
  108. If output.zip parameter is ommitted the filename.zip will be modified
  109. if necessary.
  110.  
  111. An existing output.zip will be overwritten without warning!
  112.  
  113. When using the undo -u option ZIPSHORT only undo's recent modifications
  114. to filename.zip done by ZIPSHORT. The name output.zip is ignored by this 
  115. option. The file filename.zip and filename.und must exist for this procedure.
  116.  
  117. When not specifying output.zip parameter, ZIPSHORT modifies filename.zip,
  118. generates index text file filename.lst and a binary undo file filename.und
  119.  
  120. When using output.zip parameter, ZIPSHORT copies filename.zip to output.zip
  121. modifies output.zip and generates files output.lst and output.und
  122.  
  123. Options -d and -f are used to exclude a list of (short) filenames 
  124. from being used (forces to rename a file if it has such a name).
  125.  
  126. [7] EXAMPLE
  127.  
  128. command> zipshort
  129. usage: zipshort [-d dir] [-f file] [-u] filename.zip [output.zip]
  130. -d directory    all filenames existing in this directory tree are not nused
  131. -f file.lst    all filenames in this file are not used (one filename per line)
  132. -u file.und    undo changes
  133.  
  134.   You get the usage text when starting zipshort without parameters.
  135.  
  136. command> zipshort longname.zip
  137.   The file longname.zip will be modified if it contains zipped 
  138.   files having non-dos compatible filenames.
  139.   The files longname.lst and longname.und will be created.
  140.  
  141. command> zipshort -u longname.zip
  142.   The program looks for longname.und and will undo modifications of
  143.   longname.zip . The file longname.zip now is exactly as before using 
  144.   zipshort
  145.  
  146. command> zipshort longname.zip shortnam.zip
  147.   The program saves the modified zipfile to file shortnam.zip
  148.   The files shortnam.und and shortnam.lst are generated if modifications
  149.   are necessary.
  150.  
  151. The listing file will look like:
  152. whnthsnt.mid    When The Saints Go Marching In.mid
  153. thtswhtf.mid    That's What Friends Are For.mid
  154. mrnnghsb.mid    Morning Has Broken.mid
  155. lrdflrds.mid    Lord of Lords.mid
  156. jshfghtt.mid    Joshua Fought The Battle of Jerhico.mid
  157. jesslvsm.mid    Jesus Loves Me.mid
  158. jsslvsmn.mid    Jesus Loves Me in bluegrass format.mid
  159. grtsthlr.mid    Great is the Lord1.mid
  160. elshadd1.mid    El Shaddai1.mid
  161.  
  162. After using ZIPSHORT you will usually use PKUNZIP or a similiar program 
  163. to extract the files from the archive:
  164.  
  165. command> pkunzip longname.zip 
  166. Searching ZIP: LONGNAME.ZIP
  167.   Inflating: whnthsnt.mid  
  168.   Inflating: thtswhtf.mid  
  169.   Inflating: mrnnghsb.mid  
  170.   Inflating: lrdflrds.mid  
  171.   Inflating: jshfghtt.mid  
  172.   Inflating: jesslvsm.mid  
  173.   Inflating: jsslvsmn.mid  
  174.   Inflating: grtsthlr.mid  
  175.   Inflating: elshadd1.mid  
  176.  
  177. See documentation of PKUNZIP for details.
  178.  
  179. Use the content of longname.lst to remember the original name of an extracted
  180. file.
  181.  
  182. command> zipshort -d l:\midi longname.zip 
  183. directory l:\midi: 3568 filenames excluded
  184.  
  185.    This command will zipshort force to have a look at directory l:\midi
  186.    (and its subdirectories). It will get all existing filenames and
  187.    tries not to use them when modifying filenames. Instead it will
  188.    add a number to make the short filename unique.
  189.  
  190. command> zipshort -f l:\midi\index.lst longname.zip 
  191. directory l:\midi\index.lst: 3553 filenames excluded
  192.  
  193.    ZIPSHORT will read the given textfile index.lst and load all 
  194.    filenames from this file. These names will not be used when 
  195.    modifying filenames.
  196.  
  197. The file listing should look like:
  198. aftersun.mid    After the Sunrise (Yanni)
  199. aftrlove.mid    After The Love Has Gone (Earth Wind & Fire)
  200. aftrmid.mid     After Midnight (?)
  201. agadou.mid      Agadou (?)
  202. again.mid    Again (Janet Jackson)
  203. againodd.mid    Against all odds (Phil Collins)
  204. aganstwd.mid    Against the Wind (Bob Seger)
  205.  
  206. Each line contains a filename at beginning of the line, the rest of the line
  207. is ignored and could contain comment etc.
  208.  
  209. Options -d and -f can be used together and more than once (e.g. exclude
  210. filenames of different directories).
  211.  
  212. [8] SUGGESTIONS / COMMENTS / BUG REPORTS
  213.  
  214.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  215.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  216.